/*******************************************************************
 *
 * Copyright (C), 2021-2022, Letstrong, All rights reserved.
 *
 * Author      : 
 * Create Time : 2020-12-12
 * Version     : v0.1
 * Description : 
 *******************************************************************/

#ifndef _SW_TIMER_TASK_H_
#define _SW_TIMER_TASK_H_


/*
 * INCLUDE FILES
 ****************************************************************************************
 */
#include <stdint.h>
#include "prf.h"
#include "attm.h"
#include "rwip_task.h" // Task definitions
#include "prf_types.h"
/*
 * DEFINES
 ****************************************************************************************
 */


/*
 * TYPE DEFINITIONS
 ****************************************************************************************
 */

enum
{
    SW_TIMER_EVT_MIN = TASK_FIRST_MSG(TASK_ID_SW_TIMER),
	SW_TIMER_EVT_UTC,
	SW_TIMER_EVT_BUTTON,
	SW_TIMER_EVT_DOUBLE_CLICK,
	SW_TIMER_EVT_CONTI_SKIP_MAX_INV,
    SW_TIMER_EVT_ALG_SKIP_SIGNAL,
	SW_TIMER_EVT_DISP_AUTO_UPDATE,
	SW_TIMER_EVT_BATT_ADC_READ,
	SW_TIMER_EVT_BATT_CHG_CHK,
	SW_TIMER_EVT_MOTOR_STOP,
	SW_TIMER_EVT_BLE_CHANGE_ADV,
	SW_TIMER_EVT_BLE_RESEND,
	SW_TIMER_EVT_BLE_DELAY_SEND,
	SW_TIMER_EVT_DELAY_RESET,
	SW_TIMER_EVT_MAX,
};

extern void app_sw_timer_stop_all(void);
extern void utc_timer_start(void);
extern void utc_timer_stop(void);
extern void button_timer_start(uint32_t ms);
extern void button_timer_stop(void);
extern void couple_click_timer_start(uint32_t ms);
extern void skip_alg_max_inv_timer_start(uint32_t ms);
extern void skip_alg_signal_timer_start(uint32_t ms);
extern void disp_auto_update_timer_start(uint32_t ms);
extern void disp_auto_update_timer_stop(void);
extern void batt_adc_timer_start(uint32_t ms);
extern void batt_adc_timer_stop(void);
extern void batt_chg_sta_chk_timer_start(uint32_t ms);
extern void motor_timer_start(uint32_t ms);
extern void motor_timer_stop(void);
extern void ble_change_slow_adv_timer_start(uint32_t ms);
extern void ble_resend_timer_start(uint32_t ms);
extern void ble_resend_timer_stop(void);
extern void ble_delay_send_timer_start(uint32_t ms);
extern void ble_delay_send_timer_stop(void);
extern void delay_reset_timer_start(uint32_t ms, bool is_ship_reset);

#endif
